package com.joysuch.wwyt.bp.bean.inspect;

import cn.zlg.common.springmvc.validate.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.time.LocalTime;
import java.util.List;

/**
 * @Author ZhangDong
 * @Date 2020/2/25 12:07
 */
@Data
public class BpInspectPlanBean implements Serializable {

    @ApiModelProperty("主键ID")
    private Long id;

    @ApiModelProperty("检查计划名称")
    @NotEmpty(message = "检查计划名称不能为空")
    private String name;

    @ApiModelProperty("检查类型id")
    @NotNull(message = "请选择检查类型")
    private Long inspectTypeId;

    @ApiModelProperty("检查全部点位: 是/否")
    @NotEmpty(message = "请选择是否检查全部点位")
    private String checkAllPoint;

    @ApiModelProperty("检查周期类型")
    @NotEmpty(message = "请选择检查周期类型")
    private String periodType;

    @ApiModelProperty("周期设置")
    @NotEmpty(message = "请选择周期设置")
    private String periodSetting;

    @ApiModelProperty("周期起始时间")
    @NotEmpty(message = "请设置周期起始时间")
    private String periodStartTime;

    @ApiModelProperty("周期结束时间--目前只针对--几小时几次")
    @JsonFormat(pattern = "HH:mm", timezone = "GMT+8")
    private LocalTime periodEndTime;

    //去除检查点最小停留时间相关业务
//    @ApiModelProperty("检查点停留最小时间(分)")
//    private Integer stopMinTime;

    @ApiModelProperty("检查时限(分钟)")
    private Integer checkLimit;

    @ApiModelProperty("异常通知(部门)")
    private Long notifyDepartId;

    @ApiModelProperty("允许开始执行误差时间-分钟")
    //@NotEmpty(message = "允许开始执行误差时间不能为空")
    private String permitDeviationTime;

    @ApiModelProperty("备注")
    private String remark;

    //todo 检查者判断

    @ApiModelProperty("检查者人员ids")
    private Long[] inspectStaffIds;

    @ApiModelProperty("检查者部门ids")
    private Long[] inspectDepartIds;

    @ApiModelProperty("检查者岗位ids")
    private Long[] inspectPositionIds;

    @ApiModelProperty("巡检点集合")
    private List<BpInspectCheckPointBean> beanLists;
}
